<?php/*http://BearDev.com */// Check to ensure this file is included in Joomla!defined('_JEXEC') or die( 'Restricted access' );class JElementModteam extends JElement{	/**	 * Element name	 *	 * @access	protected	 * @var		string	 */	var	$_name = 'Team';	function fetchElement($name, $value, &$node, $control_name)	{		global $mainframe;		$db			=& JFactory::getDBO();		$doc 		=& JFactory::getDocument();		$template 	= $mainframe->getTemplate();		$fieldName	= $control_name.'['.$name.']';				$query = "SELECT t_name as name,id FROM #__bl_teams";		$db->setQuery($query);			$rows = $db->loadObjectList();		$pos[] = JHTML::_('select.option',  0, JText::_('Select Team'), 'id', 'name' ); 		$teams = array_merge($pos,$rows);						$html = JHTML::_('select.genericlist',   $teams, 'params[team_id]', 'class="inputbox" size="1"', 'id', 'name', $value);		//$html .= "\n".'<input type="hidden" id="'.$name.'_id" name="'.$fieldName.'" value="'.$value.'" />';				return $html;	}}